package com.cea.papyrus.diagram.component.dnd;

import org.eclipse.gef.EditPart;

import com.cea.papyrus.diagram.component.editpart.ComponentDiagramEditPart;
import com.cea.papyrus.extensionpoints.dnd.utils.IFilter;

public class ComponentDNDFilter implements IFilter {

	public boolean select(Object draggedObject, EditPart targetEditPart) {

		// test to disable DnD from outline to ComponentDiagram or Composite for Interface
		if (draggedObject instanceof org.eclipse.uml2.uml.Interface) {
			 if (targetEditPart instanceof ComponentDiagramEditPart) {
				 return false;
			 }
		}	// end disable Interface
		return true;
	}
}
